package com.qiangesoft.cloud.seata.controller;

import com.alibaba.fastjson.JSONObject;
import com.qiangesoft.cloud.seata.service.StockService;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/stock")
public class StockController {

    @Autowired
    private StockService stockService;

    @PostMapping("/decNum")
    public int decNum(@RequestBody JSONObject jsonObject) {
        return stockService.decNum(jsonObject);
    }

}
